package com.dayaokeji.rhythmschoolstudent.client.common.exam.utils

import android.content.Context
import com.dayaokeji.rhythmschoolstudent.utils.ACache
import com.dayaokeji.server_api.domain.SubjectAnswer
import com.google.gson.Gson
import java.io.File
import java.time.Clock

/**
 *********************************************************************
 **  Created by Zeno on 2018-11-13
 *********************************************************************
 **  version 1.0
 *********************************************************************
 **  Copyright (C) dayaokeji.com 2018 -- 2020 All rights reserved.
 *********************************************************************
 ** 答案cache
 *********************************************************************
 */
object ExamCache {

    val gson: Gson by lazy { Gson() }

    fun saveCache(cxt: Context,answers: List<SubjectAnswer>) {
        val subjectAnswerJson = gson.toJson(answers)
        val cacheDir = cxt.cacheDir
        if (cacheDir.exists()) {
            val aCache = ACache.get(cxt)
//            aCache.put()
        }
    }
}